
package ch.hearc.coursJava.kitBase.tableau.equationOrdre1;

public class UseEquationOdre1LigneCommande
	{

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	/**
	 * <pre>
	 * Parametre 1 : a
	 * Parametre 2 : b
	 * </pre>
	 */
	public static void main(String[] args)
		{
		double[] tabCoefficients = new double[2];

		tabCoefficients[0] = Double.parseDouble(args[0]);
		tabCoefficients[1] = Double.parseDouble(args[1]);

		if (tabCoefficients[0] == 0)
			{
			System.out.println("a = 0 , pas de solution");
			}
		else
			{
			solve(tabCoefficients);
			}
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	private static void solve(double[] tabCoefficients)
		{
		double x = EquationOrdre1.solve(tabCoefficients);

		System.out.println("x = " + x);
		}

	}
